package com.jrx.anytxn.common.constant;

/**
 * @ClassName RegexConstant
 * @Description: 正则表达式
 * @Author liy
 * @Date 2019/8/20
 * @Version V1.0
 **/
public abstract class RegexConstant {
    private RegexConstant(){}

    /* 汉字*/
    public static final String CHINESE_CHARSET = "^[\\u4e00-\\u9fa5]+$";
    /* 身份证终止日期*/
    public static final String ID_CARD_END = "^((?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)|(\\u957f\\u671f))$";
    /* 日期格式, 已考虑闰年*/
    public static final String DATA_FORMAT = "^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$";
    /* 座机号码*/
    public static final String TELEPHONE_FORMAT = "^(\\d{3,4}-)*\\d{7,8}$";
    /* 电邮地址*/
    public static final String EMAIL_FORMAT = "^[\\w!#$%&'*+/=?^_`{|}~-]+(?:\\.[\\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\\w](?:[\\w-]*[\\w])?\\.)+[\\w](?:[\\w-]*[\\w])?$";
    /* 一位小数*/
    public static final String ONE_NUMBER="^[0-9]$";
    //银行卡号
    public static final String BANKCARD_NUMBER = "^([1-9]{1})(\\d{8}|\\d{14}|\\d{15}|\\d{16}|\\d{17}|\\d{18}|\\d{19})$";
    /* 手机号码*/
    public static final String MOBILE_FORMAT = "^1[3,4,5,6,7,8,9][0-9]{9}$";
    //校验银行卡标志类型
    public static final String BANKCARD_BINDTYPE = "^[0-3]$";
    //允许为空
    public static final String IS_EMPTY_STRING = "^\\s*$";
    //全部由英文字符和数字组成
    public static final String ALL_CHARSET_AND_NUMBER = "^[a-zA-Z0-9]+$";

    //身份证号
    public static final String ID_NO = "^\\d{15}|\\d{18}|(\\d{17}[X|x])$";

    // 特殊字符字符
    public static final String SPECIAL_CHAR_REGEX = "\\s|,|\\$|\\|";
}
